<html>

<head>
<title>Forms DetailsPage Wizard</title>
<link href="../../../book.css" rel="stylesheet" type="text/css">
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" width="700">
  <tr>
    <td><h1>Forms DetailsPage Wizard</h1>
      <div align="left">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td valign="top">
			<img src="images/wizard_forms_detailspage0.gif" align="left" hspace="10">Subclasses of the Eclipse Forms <b>DetailsPage</b> class can be
              created using the <b>Forms DetailsPage </b>wizard. The wizard can be
              selected from the drop down Designer wizard menu or from the
              Eclipse <b>New</b> wizard.
              <p>To use the wizard, select the project source folder and package
              to contain the class. Then enter the class name and hit the <b>Finish</b>
              button.
              <p>For more information on using Eclipse Forms, see the <a href="http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/pde-ui-home/working/EclipseForms/EclipseForms.html">Eclipse
              Forms Programming Guide</a>. </td>
          </tr>
        </table>
      </div>
      <p><img src="images/wizard_forms_detailspage1.gif">&nbsp;
      <img src="images/wizard_forms_detailspage2.gif"></p>
      <p>The wizard generates the following code.</p>
      <dl>
        <blockquote>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<o:p>
                        <font face="Courier New" size="2">org.eclipse.jface.viewers.ISelection;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.jface.viewers.IStructuredSelection;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.swt.SWT;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.swt.layout.FillLayout;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.swt.widgets.Composite;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.IDetailsPage;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.IFormPart;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.IManagedForm;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.widgets.ExpandableComposite;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.widgets.FormToolkit;</font></dt>
          <dt>
			<font SIZE="2" COLOR="#7f0055"><b>
			<font face="Courier">import</font></b></font><font face="Courier" SIZE="2"> </font>
			<font face="Courier New" size="2">org.eclipse.ui.forms.widgets.Section;</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;<o:p>
                          </o:p>
                          </font></dt>
          <dt><font face="Courier" size="2" color="#7f0055"><b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>class</b></font><font face="Courier New" size="2"> FormsDetailsPage </font>
			<font face="Courier" size="2" color="#7f0055"><b>implements</b></font><font face="Courier New" size="2"> IDetailsPage {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          </font><font face="Courier" size="2" color="#7f0055">
			<b>private</b></font><font face="Courier New" size="2"> IManagedForm </font>
			<font size="2" color="#2a00ff" face="Courier">managedForm</font><font face="Courier New" size="2">;</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          </font><font face="Courier" size="2" color="#7f0055">
			<b>public</b></font><font face="Courier New" size="2"> FormsDetailsPage() {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          </font><font face="Courier" size="2" color="#7f0055">
			<b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> initialize(IManagedForm managedForm) {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;this.</font><font size="2" color="#2a00ff" face="Courier">managedForm</font><font face="Courier New" size="2"> = managedForm;</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          </font><font face="Courier" size="2" color="#7f0055">
			<b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> createContents(Composite parent) {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;FormToolkit toolkit =
                          </font><font size="2" color="#2a00ff" face="Courier">managedForm</font><font face="Courier New" size="2">.getToolkit();</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;parent.setLayout(</font><font face="Courier" size="2" color="#7f0055"><b>new</b></font><font face="Courier New" size="2"> 
			FillLayout());</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;final Section section =
                          toolkit.createSection(parent,</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ExpandableComposite.</font><font size="2" color="#0000c0" face="Courier"><i>EXPANDED</i></font><font face="Courier New" size="2">
                          | ExpandableComposite.</font><font size="2" color="#0000c0" face="Courier"><i>TITLE_BAR</i></font><font face="Courier New" size="2">);</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;section.setText(</font><font size="2" color="#2a00ff" face="Courier">&quot;Empty
                          Section&quot;</font><font face="Courier New" size="2">);</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;<o:p>
                          </o:p>
                          </font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;final Composite composite
                          =&nbsp;</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                          toolkit.createComposite(section, SWT.</font><font size="2" color="#0000c0" face="Courier"><i>NONE</i></font><font face="Courier New" size="2">);</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;toolkit.paintBordersFor(composite);</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;section.setClient(composite);</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; </font>
			<font face="Courier" size="2" color="#7f0055"><b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> 
			dispose() {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; </font>
			<font face="Courier" size="2" color="#7f0055"><b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> setFocus() {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; </font>
			<font face="Courier" size="2" color="#7f0055"><b>private</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> 
			update() {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          </font><font face="Courier" size="2" color="#7f0055">
			<b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>boolean</b></font><font face="Courier New" size="2"> setFormInput(Object input) {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</font><font face="Courier" size="2" color="#7f0055"><b>return</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>false</b></font><font face="Courier New" size="2">;</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          </font><font face="Courier" size="2" color="#7f0055">
			<b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> selectionChanged(IFormPart part,
                          ISelection selection) {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;IStructuredSelection
                          structuredSelection =&nbsp;</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                          (IStructuredSelection) selection;</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;update();</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          </font><font face="Courier" size="2" color="#7f0055">
			<b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> commit(</font><font face="Courier" size="2" color="#7f0055"><b>boolean</b></font><font face="Courier New" size="2"> onSave) {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          </font><font face="Courier" size="2" color="#7f0055">
			<b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>boolean</b></font><font face="Courier New" size="2"> isDirty() {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</font><font face="Courier" size="2" color="#7f0055"><b>return</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>false</b></font><font face="Courier New" size="2">;</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          </font><font face="Courier" size="2" color="#7f0055">
			<b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>boolean</b></font><font face="Courier New" size="2"> isStale() {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</font><font face="Courier" size="2" color="#7f0055"><b>return</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>false</b></font><font face="Courier New" size="2">;</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp; </font>
			<font face="Courier" size="2" color="#7f0055"><b>public</b></font><font face="Courier New" size="2"> </font>
			<font face="Courier" size="2" color="#7f0055"><b>void</b></font><font face="Courier New" size="2"> 
			refresh() {</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          &nbsp;&nbsp;&nbsp;&nbsp;update();</font></dt>
          <dt><font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;
                          }</font></dt>
          <dt><font face="Courier New" size="2">}</font></dt>
        </blockquote>
      </dl>
      <p>When editing Eclipse Forms DetailsPages, a set of specialized
		<a href="../../palettes/swt_palette.html#EclipseForms">Eclipse Forms widgets</a> is available with their own unique widget palette.
                    These widgets provide the &quot;flat&quot; look that is a
                    signature element of the Eclipse Forms API. Standard
      widgets and layout managers can also be used although they won't use the
                    flat look.</p>
      <div align="left">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td valign="top">&nbsp;<img src="images/wizard_forms_detailspage3.gif" width="840" height="478"></td>
          </tr>
        </table>
      </div>
      </td>
  </tr>
</table>
</body>
</html>
